package it.blueocean.acanto.taglibrary.jsp.taglib.tags.dataset.filter;

import java.util.ArrayList;
import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class OrListDatasetFilter implements DatasetFilter
{
	private final static Logger logger_ = LoggerFactory.getLogger(OrListDatasetFilter.class);

	private List conditions_;

	public OrListDatasetFilter()
	{
	}

	public OrListDatasetFilter(String[] paramArrayOfString)
	{
		for (int i = 0; i < paramArrayOfString.length; ++i)
			this.conditions_.add(paramArrayOfString[i]);
	}

	public String getFilterString()
	{
		StringBuffer localStringBuffer = new StringBuffer();
		for (int i = 0; i < this.conditions_.size(); ++i)
		{
			String str = (String) this.conditions_.get(i);
			if(str.equals(""))
				continue;
			if(i > 0)
				localStringBuffer.append(" OR ");
			localStringBuffer.append("(");
			localStringBuffer.append(str);
			localStringBuffer.append(")");
		}
		return localStringBuffer.toString();
	}

	public List getFilterParams()
	{
		return new ArrayList();
	}

	public String toString()
	{
		return getFilterString();
	}

	public boolean applyFilter(Object paramObject)
	{
		logger_.error("Method not implemented");
		return false;
	}
}
